package cn.edu.lsnu.mbti.controller;

import cn.edu.lsnu.mbti.common.R;
import cn.edu.lsnu.mbti.entity.Personality;
import cn.edu.lsnu.mbti.service.PersonalityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("personality")
@Slf4j
public class PersonalityController {

    @Resource
    private PersonalityService personalityService;

    @GetMapping("list")
    public R<List<Personality>> list(){
        return R.success(personalityService.personalityList());
    }
}
